package com.ereach;

import java.util.HashMap;
import java.util.Map;

public class MainMap {
    public static void main(String[] args) {
        Map<String, Integer> map = new HashMap<>();

        map.put("one", 1);
        map.put("two", 2);
        map.put("three", 3);
        map.put("four", 4);
        map.put("five", 5);
        map.put("six", 6);

        System.out.println(map);
        System.out.println(map.size());
        System.out.println(map.get("three"));
        System.out.println(map.containsKey("five"));
        System.out.println(map.containsValue(5));
        map.remove("two");
        System.out.println(map);
        boolean isRemoved = map.remove("five", 5);
        System.out.println(isRemoved);
        System.out.println(map);
    }
}
